<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>班级管理</title>
	<%@ include file="/pages/common/head_base.jsp"%>

	<script type="text/javascript">
		$(function () {
			$("a.deleteClass").click(function () {
				/**
				 * confirm("提示信息")是一个确认提示按钮
				 * 参数是提示信息
				 * 有两个按钮：确认和取消
				 * 返回true表示确认，返回false表示取消
				 */
				return confirm("你确定要删除班级号为" + $(this).parent().parent().find("td:first").text() + "的班级吗?");
			})
		})
	</script>

</head>
<body>
	
	<div id="header">
			<span class="wel_word">班级管理</span>
		<%@ include file="/pages/common/manager_menu.jsp"%>
	</div>
	
	<div id="main">

		<table>
			<tr>
				<td>班级号</td>
				<td>班主任</td>
				<td>班级名</td>
				<td>年级</td>
				<td colspan="2">操作</td>
			</tr>

			<c:forEach items="${requestScope.classList}" var="clazz">
				<tr>
					<td>${clazz.classno}</td>
					<td>${clazz.tno}</td>
					<td>${clazz.classname}</td>
					<td>${clazz.classgrade}</td>
					<td><a href="studentServlet?action=findStudentByClassno&classno=${clazz.classno}">班级详情</a></td>
					<td><a href="classServlet?action=findClass&classno=${clazz.classno}">班级选课</a></td>
				</tr>
			</c:forEach>

			<tr>
				<td></td>
				<td></td>
				<td></td>
				<td></td>
				<td><a href="pages/manager/class_edit.jsp">添加班级</a></td>
				<td><a href="classServlet?action=exportXLS">导出报表</a></td>
			</tr>
		</table>
	</div>
	<%@ include file="/pages/common/footer.jsp"%>
</body>
</html>